package com.runa.protocol.dto;

import com.runa.protocol.enums.ModbusFunctionCode;
import com.runa.protocol.enums.ModbusType;

/**
 * @author zhuj
 */
public class ModbusResponseData extends ModbusData implements IResponseData{

    private int count;

    public ModbusResponseData(ModbusType type, int slaveId, ModbusFunctionCode functionCode, int count, byte[] data) {
        super(type, slaveId, functionCode);
        this.count = count;
        setData(data);
    }

    public int getCount() {
        return count;
    }

    @Override
    public byte[] getData() {
        return data;
    }

    public ModbusFunctionCode getFunctionCode() {
        return super.getFunctionCode();
    }

}
